<?php

$userid = get_loggedin_userid();

// Get variables
$friendid = get_input('friend_id');
$client_id = get_input('client_id');

if ($client_id == 'opinions') {
    $result = check_opinions_friend($friendid, $userid);
    echo json_encode(export_result(200, $result));
    exit;
}

$result = check_whiteboard_friend($friendid, $userid);
echo json_encode(export_result(200, $result));

?>